package com.hhtc.jsj.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 点赞表
 * </p>
 *
 * @author ty
 * @since 2022-04-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("post_like")
@ApiModel(value="PostLike对象", description="点赞表")
public class PostLike extends Model<PostLike> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "关联id")
    @TableField("relation_id")
    private Long relationId;

    @ApiModelProperty(value = "被点赞人id")
    @TableField("liked_user_id")
    private Long likedUserId;

    @ApiModelProperty(value = "点赞人id")
    @TableField("like_user_id")
    private Long likeUserId;

    @ApiModelProperty(value = "点赞人名")
    @TableField("like_user_name")
    private String likeUserName;

    @ApiModelProperty(value = "点赞人头像")
    @TableField("like_head_images")
    private String likeHeadImages;

    @ApiModelProperty(value = "是否已读")
    @TableField("is_read")
    private Integer isRead;

    @ApiModelProperty(value = "是否取消")
    @TableField("is_cancel")
    private Integer isCancel;

    @ApiModelProperty(value = "创建时间")
    @TableField("created_time")
    private Long createdTime;

    @ApiModelProperty(value = "创建人")
    @TableField("created_by")
    private String createdBy;

    @ApiModelProperty(value = "修改时间")
    @TableField("updated_time")
    private Long updatedTime;

    @ApiModelProperty(value = "修改人")
    @TableField("updated_by")
    private String updatedBy;

    @ApiModelProperty(value = "删除状态（ 1 正常  2删除）")
    @TableField("is_deleted")
    private Integer isDeleted;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
